<html xmlns="http://www.w3.org/1999/xhtml" manifest="http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/wildcardManifest.cacheManifest">
<head>
<title>wildcard in network section test</title>

<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="/tests/dom/tests/mochitest/ajax/offline/offlineTests.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />

<style>
  img {
    max-width: 400px;
    max-height: 400px;
  }
</style>

<script type="text/javascript">

var gImageLoaded = [];

function imageOnLoad(idx)
{
  gImageLoaded[idx] = true;
}

function manifestUpdated()
{
  window.location.reload();
}

function finishTheTest()
{
  OfflineTest.is(gImageLoaded[1], true, "Image from a different origin not cointained in the offline cache has loaded");
  OfflineTest.is(gImageLoaded[2], true, "Image not cointained in the offline cache has loaded");
  OfflineTest.teardownAndFinish();
}

if (OfflineTest.setup()) {
  applicationCache.onerror = OfflineTest.failEvent;
  applicationCache.oncached = OfflineTest.priv(manifestUpdated);
  applicationCache.onnoupdate = OfflineTest.priv(finishTheTest);
}

SimpleTest.waitForExplicitFinish();

</script>

</head>

<body>
  <img src="http://example.com/tests/dom/tests/mochitest/ajax/offline/jupiter.jpg" onload="imageOnLoad(1)" />
  <img src="jupiter.jpg" onload="imageOnLoad(2)" />
</body>
</html>
